package com.service.impl;

import com.bean.Owner;
import com.dao.impl.OwnerDAOImpl;
import com.service.OwnerService;

import java.sql.SQLException;
import java.util.List;

public class OwnerServiceImpl implements OwnerService {

    OwnerDAOImpl ownerDAO = new OwnerDAOImpl();
    @Override
    public List<Owner> selectAll() throws SQLException {
        return ownerDAO.selectAll();
    }
    @Override
    public List<Owner> selectById(String id) throws SQLException {
        return ownerDAO.selectById(id);
    }
    @Override
    public boolean deleteById(Integer id) throws SQLException {
        return ownerDAO.deleteById(id);
    }
    @Override
    public boolean removeAll(String[] idsArr) throws SQLException {
        return ownerDAO.deleteAll(idsArr);
    }
    @Override
    public boolean insert(Owner o) throws SQLException {
        return ownerDAO.insert(o);
    }
    @Override
    public boolean update(Owner o) throws SQLException {
        return ownerDAO.update(o);
    }

    @Override
    public Integer count() throws SQLException {
        return ownerDAO.count();
    }
    @Override
    public Integer countSearch(String search) throws SQLException {
        return ownerDAO.countSearch(search);
    }

    @Override
    public List<Owner> selectAllPagination(Integer offset, Integer limit) throws SQLException {
        return ownerDAO.selectAllPagination(offset,limit);
    }
    @Override
    public List<Owner> selectAllPaginationSearch(Integer offset, Integer limit, String search) throws SQLException {
        return ownerDAO.selectAllPaginationSearch(offset,limit,search);
    }

}